package com.mes.cloud.service;

import com.github.pagehelper.PageInfo;
import com.mes.cloud.dto.BcViewDTO;
import com.mes.cloud.util.CommPager;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;

/**
 * 表字段
 *
 * @author wxm
 * @Time 2019-5-22
 */
public interface BcViewService {
    /**
     * 根据条件获取表字段列表
     *
     * @param condition
     * @return
     * @throws Exception
     */
    public List<BcViewDTO> getBcViewList(Map<Object, Object> condition);

    /**
     * 获取表字段的最大记录数
     *
     * @param condition
     * @return
     * @throws Exception
     */
    public long getBcViewCount(Map<Object, Object> condition);

    /**
     * @param condition
     * @Description:判断记录是否存在
     * @Date: 2019/7/9
     * @return:boolean
     */
    boolean exists(Map<Object, Object> condition);

    /**
     * 新增表字段
     *
     * @param bcViewDTO 表字段对象
     * @return
     */
    public long insertBcView(BcViewDTO bcViewDTO) throws Exception;

    /**
     * 更新表字段
     *
     * @param bcViewDTO 表字段对象
     * @return
     */
    public long updateBcView(BcViewDTO bcViewDTO);

    /**
     * 删除表字段
     *
     * @param id 表字段标识
     * @return
     */
    public long delBcViewById(String id);

    /**
     * 根据表字段标识获取表字段
     *
     * @param id 表字段标识
     * @return
     */
    public BcViewDTO getBcViewById(String id);

    CommPager<BcViewDTO> getBcViewListPage(Map<Object, Object> map);

    long batchDelete(Map<Object, Object> map) throws Exception;

    long enable(Map<Object, Object> map) throws Exception;

    int importExcel(MultipartFile file) throws Exception;

    void exportFile(Map<Object, Object> map, HttpServletResponse response) throws Exception;

    BcViewDTO getByCode(String code);

    Long batchEnable(Map<Object, Object> map) throws Exception;
}
